home *** CD-ROM | disk | FTP | other *** search
/ Skunkware 5 / Skunkware 5.iso / src / Tools / glimpse-2.1 / libtemplate / util / strerror.c < prev    next >
C/C++ Source or Header  |  1995-05-16  |  3KB  |  70 lines

  1. static char rcsid[] = "$Id: strerror.c,v 1.8 1995/02/04 01:37:56 hardy Exp $";
  2. /*
  3.  *  strerror.c - print message associated with errno
  4.  *
  5.  *  Darren Hardy, hardy@cs.colorado.edu, April 1994
  6.  *
  7.  *  ----------------------------------------------------------------------
  8.  *  Copyright (c) 1994, 1995.  All rights reserved.
  9.  *  
  10.  *          Mic Bowman of Transarc Corporation.
  11.  *          Peter Danzig of the University of Southern California.
  12.  *          Darren R. Hardy of the University of Colorado at Boulder.
  13.  *          Udi Manber of the University of Arizona.
  14.  *          Michael F. Schwartz of the University of Colorado at Boulder. 
  15.  *  
  16.  *  This copyright notice applies to all code in Harvest other than
  17.  *  subsystems developed elsewhere, which contain other copyright notices
  18.  *  in their source text.
  19.  *  
  20.  *  The Harvest software was developed by the Internet Research Task
  21.  *  Force Research Group on Resource Discovery (IRTF-RD).  The Harvest
  22.  *  software may be used for academic, research, government, and internal
  23.  *  business purposes without charge.  If you wish to sell or distribute
  24.  *  the Harvest software to commercial clients or partners, you must
  25.  *  license the software.  See
  26.  *  http://harvest.cs.colorado.edu/harvest/copyright,licensing.html#licensing.
  27.  *  
  28.  *  The Harvest software is provided ``as is'', without express or
  29.  *  implied warranty, and with no support nor obligation to assist in its
  30.  *  use, correction, modification or enhancement.  We assume no liability
  31.  *  with respect to the infringement of copyrights, trade secrets, or any
  32.  *  patents, and are not responsible for consequential damages.  Proper
  33.  *  use of the Harvest software is entirely the responsibility of the user.
  34.  *  
  35.  *  For those who are using Harvest for non-commercial purposes, you may
  36.  *  make derivative works, subject to the following constraints:
  37.  *  
  38.  *  - You must include the above copyright notice and these accompanying 
  39.  *    paragraphs in all forms of derivative works, and any documentation 
  40.  *    and other materials related to such distribution and use acknowledge 
  41.  *    that the software was developed at the above institutions.
  42.  *  
  43.  *  - You must notify IRTF-RD regarding your distribution of the 
  44.  *    derivative work.
  45.  *  
  46.  *  - You must clearly notify users that your are distributing a modified 
  47.  *    version and not the original Harvest software.
  48.  *  
  49.  *  - Any derivative product is also subject to the restrictions of the 
  50.  *    copyright, including distribution and use limitations.
  51.  */
  52. #include <stdio.h>
  53. #include "util.h"
  54.  
  55. #ifdef NO_STRERROR
  56. /*
  57.  *   strerror() - same as strerror(3)
  58.  */
  59. char *strerror(n)
  60. int n;
  61. {
  62.     extern int sys_nerr;
  63.     extern char *sys_errlist[];
  64.  
  65.     if (n < 0 || n >= sys_nerr)
  66.         return (NULL);
  67.     return (sys_errlist[n]);
  68. }
  69. #endif
  70.